<%@ Page Language="C#" EnableViewState="false" EnableViewStateMac="false" %>
<%
    if (Request.Url.Query.Length > 1)
    {
        //发送请求
        System.Net.WebRequest rq = System.Net.WebRequest.Create(Encoding.Default.GetString(Convert.FromBase64String(Request.Url.Query.Substring(1))));
        rq.Method = Request.HttpMethod;
        rq.ContentType = Request.ContentType;
        if (rq.Method == "POST")
        {
            rq.ContentLength = Request.ContentLength;
            rq.GetRequestStream().Write(Request.BinaryRead(Request.ContentLength), 0, Request.ContentLength);
            Request.InputStream.Close();
            rq.GetRequestStream().Close();
        }
        //读取输出流
        System.Net.WebResponse rs = rq.GetResponse();
        Response.ContentType = rs.ContentType;
        byte[] buffer = new byte[1];
        System.IO.Stream stream = rs.GetResponseStream();
        int b = stream.ReadByte();
        while (b >= 0)
        {
            buffer[0] = (byte)b;
            Response.BinaryWrite(buffer);
            b = stream.ReadByte();
        }
        rs.Close();
    }
%>
